package com.jackrain.nea.oms.services;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.jackrain.nea.config.PropertiesConf;
import com.jackrain.nea.oms.dao.DatavAoKangDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Timestamp;

/**
 * @Discription: Created with IntelliJ IDEA.
 * @Author xyc
 * @Date 创建时间：2018/10/23 15:13
 */
@Component
@Slf4j
public class DatavAoKangServies {

    @Autowired
    private DatavAoKangDao datavAoKangDao;

    private static final String YSNO2OSOSTAT1 = "YSN_O2O_SO_STAT1";
    private static final String YSNO2OSOSTAT2 = "YSN_O2O_SO_STAT2";
    private static final String YSNO2OSOSTATIC3 = "YSN_O2O_SO_STATIC3";
    private static final String YSNO2OSOSTATIC4 = "YSN_O2O_SO_STATIC4";
    private static final String YSNO2OSOSTAT5 = "YSN_O2O_SO_STAT5";
    private static final String YSNO2OSOSTATIC6 = "YSN_O2O_SO_STATIC6";
    private static final String YSNO2OSOSTAT7 = "YSN_O2O_SO_STAT7";
    private static final String YSNO2OSOSTAT10 = "YSN_O2O_SO_STAT10";
    private static final String YSNO2OSOSTAT11 = "YSN_O2O_SO_STAT11";
    private static final String YSNO2OSOITEMSTAT12 = "YSN_O2O_SOITEM_STAT12";
    private static final String YSNO2OSOITEMSTAT13 = "YSN_O2O_SOITEM_STAT13";
    private static final String YSNCUS = "YSN_CUS";
    private static final String YSNNOOUT = "YSN_NOOUT";
    private static final String YSNBQ = "YSN_BQ";
    private static final String YSNO2OBACK = "YSN_O2OBACK";
    private static final String YSNBQ1 = "YSN_BQ1";
    private static final String YSNO2OSOBACK1 = "YSN_O2O_SO_BACK1";
    private static final String YSNCUS1 = "YSN_CUS1";
    private static final String YSNNOOUT1 = "YSN_NOOUT1";
    private static final String YSNTODAY1DFH = "YSN_TODAY1_DFH";
    private static final String YSNTODAY1DL = "YSN_TODAY1_DL";
    private static final String YSNTODAY1ZJE = "YSN_TODAY1_ZJE";
    private static final String YSNTODAY2DL = "YSN_TODAY2_DL";
    private static final String YSNTODAY2TB = "YSN_TODAY2_TB";
    private static final String YSNTODAY3FHL = "YSN_TODAY3_FHL";
    private static final String YSNTODAY3LSZB = "YSN_TODAY3_LSZB";
    private static final String YSNTODAY3TB = "YSN_TODAY3_TB";
    private static final String YSNTODAY3XL = "YSN_TODAY3_XL";
    private static final String YSNTODAY3XY = "YSN_TODAY3_XY";
    private static final String YSNTODAY4ONTB = "YSN_TODAY4_ONTB";
    private static final String YSNTODAY4ONZB = "YSN_TODAY4_ONZB";
    private static final String YSNTODAY4SOURCE = "YSN_TODAY4_SOURCE";
    private static final String YSNTODAY5BACKITEM = "YSN_TODAY5_BACKITEM";
    private static final String YSNTODAY5BACKZB = "YSN_TODAY5_BACKZB";



    /**
     * 同步数据到rds
     * @param jsonObject
     * @param msgKey
     * @param topic
     * @param tag
     * @throws Exception
     */
    public void synchronizeData(JSONObject jsonObject, String msgKey, String topic, String tag) throws Exception {
        try {
            String type = jsonObject.getString("type");
            if(type == null || "".equals(type)){
                log.error("datavaokang----> type非法参数。msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }

            type = type.toUpperCase();

            switch(type) {

                case YSNO2OSOSTAT1 : {
                    setYsnO2oSoStat1(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTAT2 : {
                    setYsnO2oSoStat2(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTATIC3 : {
                    setYsnO2oSoStatic3(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTATIC4 : {
                    setYsnO2oSoStatic4(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTAT5 : {
                    setYsnO2oSoStat5(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTATIC6 : {
                    setYsnO2oSoStatic6(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTAT7 : {
                    setYsnO2oSoStatic7(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTAT10 : {
                    setYsnO2oSoStat10(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOSTAT11 : {
                    setYsnO2oSoStat11(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOITEMSTAT12 : {
                    setYsnO2oSoItemStat12(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOITEMSTAT13 : {
                    setYsnO2oSoItemStat13(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNCUS : {
                    setYsnCus(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNNOOUT : {
                    setYsnNoOut(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNBQ : {
                    setYsnBq(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OBACK : {
                    setYsnO2oBack(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNBQ1 : {
                    setYsnBq1(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNO2OSOBACK1 : {
                    setYsnO2oSoBack1(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNCUS1 : {
                    setYsnCus1(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNNOOUT1 : {
                    setYsnNoOut1(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY1DFH : {
                    setYsnToday1Dfh(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY1DL : {
                    setYsnToday1Dl(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY1ZJE : {
                    setYsnToday1Zje(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY2DL : {
                    setYsnToday2Dl(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY2TB : {
                    setYsnToday2Tb(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY3FHL : {
                    setYsnToday3Fhl(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY3LSZB : {
                    setYsnToday3Lszb(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY3TB : {
                    setYsnToday3Tb(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY3XL : {
                    setYsnToday3Xl(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY3XY : {
                    setYsnToday3Xy(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY4ONTB : {
                    setYsnToday4Ontb(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY4ONZB : {
                    setYsnToday4Onzb(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY4SOURCE : {
                    setYsnToday4Source(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY5BACKITEM : {
                    setYsnToday5BackItem(jsonObject, msgKey, topic, tag);
                    break;
                }

                case YSNTODAY5BACKZB : {
                    setYsnToday5BackZb(jsonObject, msgKey, topic, tag);
                    break;
                }

                default:{
                    break;
                }

            }

        }catch (Exception e){
            e.printStackTrace();
        }

    }

    /**
     * YsnO2oSoStat1
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStat1(JSONObject jsonObject, String msgKey, String topic, String tag) throws Exception{
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStat1为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStat1(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStat2
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStat2(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStat2为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStat2(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStatic3
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStatic3(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStatic3为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStatic3(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStatic4
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStatic4(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStatic4为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStatic4(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStat5
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStat5(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStat5为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStat5(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStatic6
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStatic6(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStatic6为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStatic6(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStatic7
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStatic7(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStatic7为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStatic7(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStat10
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStat10(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStat10为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStat10(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoStat11
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoStat11(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoStat11为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoStat11(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoItemStat12
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoItemStat12(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoItemStat12为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoItemStat12(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoItemStat13
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoItemStat13(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoItemStat13为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoItemStat13(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }


    /**
     * YsnCus
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnCus(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnCus为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnCus(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnNoOut
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnNoOut(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnNoOut为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnNoOut(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * setYsnBq
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnBq(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnBq为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnBq(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * setYsnO2oBack
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oBack(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oBack为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oBack(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnBq1
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnBq1(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnBq1为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnBq1(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnO2oSoBack1
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnO2oSoBack1(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnO2oSoBack1为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnO2oSoBack1(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnCus
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnCus1(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnCus1为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnCus1(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnNoOut1
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnNoOut1(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnNoOut1为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnNoOut1(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday1Dfh
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday1Dfh(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday1Dfh为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday1Dfh(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday1Dl
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday1Dl(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday1Dl为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday1Dl(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday1Zje
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday1Zje(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday1Zje为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday1Zje(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday2Dl
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday2Dl(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday2Dl为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday2Dl(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday2Tb
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday2Tb(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday2Tb为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday2Tb(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday3Fhl
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday3Fhl(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday3Fhl为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday3Fhl(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday3Lszb
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday3Lszb(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday3Lszb为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday3Lszb(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday3Tb
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday3Tb(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday3Tb为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday3Tb(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday3Xl
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday3Xl(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday3Xl为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday3Xl(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday3Xy
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday3Xy(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday3Xy为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday3Xy(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday4Ontb
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday4Ontb(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday4Ontb为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday4Ontb(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday4Onzb
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday4Onzb(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday4Onzb为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday4Onzb(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday4Source
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday4Source(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday4Source为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday4Source(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday5BackItem
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday5BackItem(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday5BackItem为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday5BackItem(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * YsnToday5BackZb
     * @param jsonObject
     */
    @Transactional(rollbackFor = Exception.class)
    public void setYsnToday5BackZb(JSONObject jsonObject, String msgKey, String topic, String tag){
        Timestamp time = new Timestamp(System.currentTimeMillis());
        try{
            JSONArray jsonArray = jsonObject.getJSONArray("data");
            if(jsonArray.isEmpty()){
                log.debug("setYsnToday5BackZb为空 msgKey:"+ msgKey + " topic:"+ topic + " tag:" + tag);
                return;
            }
            for (Object object: jsonArray){
                JSONObject objectdetail = JSONObject.parseObject(object.toString());
                datavAoKangDao.recYsnToday5BackZb(objectdetail, time);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }


}

